﻿using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;

namespace adodotnetservicesphp.services.samples
{
    [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    public class NorthwindDataService : DataService<NorthwindEntities>
    {
        // This method is called only once to initialize service-wide policies.
        public static void InitializeService(IDataServiceConfiguration config)
        {
            config.UseVerboseErrors = true;

            // This is only a sample service that does not have any security.
            // Any production service will typically enforce some kind if security.
            config.SetEntitySetAccessRule("*", EntitySetRights.All);
        }
    }
}
